package com.learn.kotlinlearndemolist.ui

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import androidx.navigation.NavController
import androidx.navigation.Navigation
import androidx.navigation.fragment.NavHostFragment
import com.learn.kotlinlearndemolist.R
import com.learn.kotlinlearndemolist.databinding.FragmentFirstBinding
import com.learn.kotlinlearndemolist.databinding.FragmentFourthBinding

class FourthFragment : Fragment() {

    private lateinit var mBinding: FragmentFourthBinding

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        // Inflate the layout for this fragment
        mBinding = DataBindingUtil.inflate(
            LayoutInflater.from(requireContext()),
            R.layout.fragment_fourth,
            container,
            false
        )
        return mBinding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        mBinding.backView.setOnClickListener {
            Navigation.findNavController(it).navigateUp()
        }
    }

}